<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<script type="text/javascript">
    var item_state = [
        {id: 1, name: "正常"},
        {id: 2, name: "损坏"},
        {id: 3, name: "丢失"}
    ];
    function getItemStateName(state) {
        for (var i = 0; i < item_state.length; i++) {
            if (state == item_state[i].id) {
                return item_state[i].name;
            }
        }
        return '异常';
    }
</script>